From: svermeul@suntzu.psg.datap.ca (Stephen Vermeulen)
Message-Id: <199603251827.LAA19983@alien.psg.datap.ca>
To: mui@sunsite.Informatik.RWTH-Aachen.DE
Subject: MUI FAQ: a question on the ESC key
X-Sun-Charset: US-ASCII
Resent-Message-Id: <"C6rc33.0.Ti3.mOkLn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/779
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 861
X-Lines: 29
Status: RO

Q: I would like to allow users of my program to include the ESC (\33) character
   in the text they type into a string gadget.  However, as soon as a user hits
   the ESC key (even when a string gadget is active) the window containing the
   string gadget is closed.  How do I get around this?

A: Currently the only way I have discovered to do this is to set up another gadget
   in the window (perhaps a simple button) labeled: "ESC".  Then, when the user
   hits this button code similar to the following is executed:

      char *p;
      char buf[256];
      APTR stringObject;

      get(stringObject, MUIA_StringContents, &p);
      if (p)
      {
        strcpy(buf, p);
        strcat(buf, "\033");
        set(stringObject, MUIA_StringContents, buf);
      }


-----

If someone else knows of a better solution, please SPEAK UP!


Regards, Stephen.


From: Ihmig@tu-harburg.d400.de (Simon Ihmig)
Message-Id: <21b48cee.u7t150e.3b446-Ihmig@tu-harburg.d400.de>
Subject: MUI3.1: String Position not getable anymore! :-(((
In-Reply-To: <9511282017.AA10628@sunsite.Informatik.RWTH-Aachen.DE> (from mui-request@sunsite.Informatik.RWTH-Aachen.de) (at Tue, 28 Nov 1995 21:17:10 +0100)
To: mui@sunsite.Informatik.RWTH-Aachen.DE
Date: Sat, 2 Dec 95 21:58:07
Resent-Message-Id: <"FX8qW2.0.2L2.Dhpmm"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/15
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 1034
X-Lines: 30
Status: RO


Hello,

I just want to complain about one little change in MUI3.1:
Before it was possible to get() the cursor position of a
string object. This is not the case anymore, it always returns 0!
Why am I complaining?

Well, my program "MathScript" heavily depends on one string
gadget where most user input is done. It was possible to insert
stuff into this gadget right after the current cursor position.
Now as the gadget always returns 0, everything is inserted at
the beginning.
This makes my program more or less *UNUSEABLE*! :-(((

If there was a BOOPSI lawbook, I guess this kind of feature removal
would be strictly illegal, since it must break compatibility with
existing applications!

Now I have to say to all my users that they should not use MUI3.1.
I guess that's not what you want, Stefan, so please fix this as soon
as possible! (It should not take too long since the next version won't
use this string gadget anymore ;))


--
  Simon Ihmig                   //
  Ihmig@tu-harburg.d400.de    \X/ Amiga 4000, what else?


From: "Stefan Stuntz" 
Date: 	Thu, 18 Apr 1996 21:02:31 +0100
X-Mailer: IntuiNews 1.3b Beta 7 (2.2.96)
Subject: Re: String Activation Problem
Message-Id: <81321196@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-Id: <"p8Kuu1.0.pB2.YBfTn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/1092
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 406
X-Lines: 13
Status: RO

Thomas Ganter wrote

>    Now, could it be that StringObjects have problems with noticing
>    whether they are Active or not?

Yes they have. String objects are a pain... since they're borrowed from
intuition and therefor are kind of "asynchronous", it gets quite tricky
to make them behave well in a MUI object context. As it seems, they
still dont always react as supposed to. :(

--
Greetings, Stefan


From: "Stefan Stuntz" 
Date: 	Thu, 18 Apr 1996 21:02:31 +0100
X-Mailer: IntuiNews 1.3b Beta 7 (2.2.96)
Subject: Re: Drag&Drop on StringObject
Message-Id: <81321197@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-Id: <"NzLPw3.0.aB2.WBfTn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/1091
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 925
X-Lines: 25
Status: RO

Vincenzo Gervasi wrote in article <3163F814.15FB7483@di.unipi.it>:

> The only problem is that mouse clicks in the string _gadget_ are
> (rightfully) passed to the (default) string edit hook, that gets
> them as "move cursor" commands, so the Drag&Drop only works on
> parts of the string _object_ outside the string _gadget_, like
> the very thin border.
>
> This behaviour cause the Drag&Drop to be almost useless on strings.
>
> Is there any way to correct this, for example by passing only
> mouse-up events to the edit hook, while leaving mouse-down+moves
> for the Drag&Drop?

This would make MUIs strings behave different than intution strings,
something I wouldnt consider a good idea. In fact, MUI doesnt even get
info on the mouse click, its immediately transformed into a GADGETDOWN
event by intuition.

I dont think theres a chance to drag string objects by LMB clicking
their contents. :(

--
Greetings, Stefan

From: "Stefan Stuntz" 
Date: Thu, 27 Jun 1996 13:30:36 +0100
X-Mailer: IntuiNews 1.3b Beta 7 (2.2.96)
Subject: MUIA_String_MaxLen
Message-Id: <81322910@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-ID: <"4LRhJ.0.Rp.B6dqn"@susi>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.de
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.de
X-Mailing-List:  archive/latest/1648
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.de
Content-Type: text
Content-Length: 606
X-Lines: 23
Status: RO


Hi!

MUI will hit mungwall if you try to set() MUIA_String_Contents of a
string object to a string larger as the value given in
MUIA_String_MaxLen. Please note the following paragraph
form the MUIA_String_MaxLen autodocs:

	NOTE: The maximum length includes the 0-byte at the end
	      of the string. To let the user enter e.g. 10 characters,
	      you would have to specify a maxlen of 11.

This means:

MUIA_String_MaxLen  , 5,
MUIA_String_Contents, "Hello",

is ILLEGAL! Current MUI versions cause a mungwall hit, future versions
will silently strip any additional characters.

--
Greetings, Stefan